//
//  ViewController.swift
//  礼物动画展示
//
//  Created by seven on 2017/12/29.
//  Copyright © 2017年 seven. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    @IBOutlet weak var testLabel: LXGiftDigitLabel!
    private lazy var giftContainerView: LXGiftContainerView = LXGiftContainerView(frame: CGRect(x: 0, y: 100, width: 280, height: 90))
    override func viewDidLoad() {
        super.viewDidLoad()
        giftContainerView.backgroundColor = UIColor.lightGray
        view.addSubview(giftContainerView)
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

//    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
//        testLabel.showDigitalAnimation {
//            print("执行完成")
//        }
//    }

    @IBAction func gift1(_ sender: Any) {
        let gift1 = LXGiftModel(senderName: "两岁1", senderURL: "icon1", giftName: "灰机1", giftURL: "prop_b")
        giftContainerView.showGiftModel(giftModel: gift1)
    }
    @IBAction func gift2(_ sender: Any) {
        let gift1 = LXGiftModel(senderName: "两岁2", senderURL: "icon2", giftName: "灰机2", giftURL: "prop_f")
        giftContainerView.showGiftModel(giftModel: gift1)
    }
    @IBAction func gift3(_ sender: Any) {
        let gift1 = LXGiftModel(senderName: "两岁3", senderURL: "icon3", giftName: "灰机3", giftURL: "prop_g")
        giftContainerView.showGiftModel(giftModel: gift1)
    }
}

